﻿
//Author: 张亚涛
//createtime:2016-01-14 21:11:52
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class MemberRelation
    {
        public MemberRelation()
        { }
        public MemberRelation(IDataReader reader)
        {
            _memberID = reader["MemberID"].ToString();
            _partnerID = reader["PartnerID"].ToString();
            _partnerID2 = reader["PartnerID2"].ToString();
            _partnerID3 = reader["PartnerID3"].ToString();
            if (reader["RelationDate"] != DBNull.Value)
            {
                _relationDate = DateTime.Parse(reader["RelationDate"].ToString());
            }
        }

        #region 数据库字段
        private string _memberID;
        private string _partnerID;
        private string _partnerID2;
        private string _partnerID3;
        private DateTime _relationDate;
        #endregion

        #region 字段属性
        /// <summary>
        /// 会员
        /// </summary>
        public string MemberID
        {
            set { _memberID = value; }
            get { return _memberID; }
        }
        /// <summary>
        /// 推荐人1
        /// </summary>
        public string PartnerID
        {
            set { _partnerID = value; }
            get { return _partnerID; }
        }
        /// <summary>
        /// 推荐人2
        /// </summary>
        public string PartnerID2
        {
            set { _partnerID2 = value; }
            get { return _partnerID2; }
        }
        /// <summary>
        /// 推荐人3
        /// </summary>
        public string PartnerID3
        {
            set { _partnerID3 = value; }
            get { return _partnerID3; }
        }
        /// <summary>
        /// 关联时间
        /// </summary>
        public DateTime RelationDate
        {
            set { _relationDate = value; }
            get { return _relationDate; }
        }
        #endregion
    }
}